import axios from './axios'
import api from './api'

// 已入库蛋糕列表查询(未中转前入库)
export const getWarehouseProductList = (params) => {
  return axios({
    url: '/transfer/getWarehouseProductList',
    method: 'get',
    params
  })
}

// 统计
export const getOrderStatistics = (params) => {
  return axios({
    url: '/transfer/getOrderStatistics',
    method: 'get',
    params
  })
}

// 出库
export const outbound = (data) => {
  return axios({
    url: '/transfer/outbound',
    method: 'post',
    data
  })
}

// 出发
export const sally = (data) => {
  return axios({
    url: '/transfer/sally',
    method: 'post',
    data
  })
}

// 送达
export const finish = (data) => {
  return axios({
    url: '/transfer/finish',
    method: 'post',
    data
  })
}

// 提交中转异常工单
export const submitUnusual = (data) => {
  return axios({
    url: '/transfer/submitUnusual',
    method: 'post',
    data
  })
}

// 中转记录查询
export const getTransferNoteList = (params) => {
  return axios({
    url: '/transfer/getTransferNoteList',
    method: 'get',
    params
  })
}

// 异常记录查询
export const listUnusuals = (params) => {
  return axios({
    url: '/transfer/listUnusuals',
    method: 'get',
    params
  })
}

// 移除扫码入库
export const removeOutbound = (data) => {
  return axios({
    url: '/transfer/removeOutbound',
    method: 'post',
    data
  })
}

// 通过提取码获取订单信息
export const getExtractCode = (params) => {
  return axios({
    url: '/transfer/getExtractCode',
    method: 'get',
    params
  })
}

// 通过提取码获取订单信息
export const getPartsList = (params) => {
  return axios({
    url: '/transfer/getPartsList',
    method: 'get',
    params
  })
}

// 配件中转处理
export const disposeParts = (data) => {
  return axios({
    url: '/transfer/disposeParts',
    method: 'post',
    data
  })
}

// 配件中转(未处理统计)
export const getUnDisposePartsCount = (params) => {
  return axios({
    isDebounce: true,
    url: '/transfer/getUnDisposePartsCount',
    method: 'get',
    params
  })
}
